<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=cn-gb">
		<link href="css/style.css" rel="stylesheet" type="text/css">
		<title>SSI整合-登录</title>

		<script type="text/javascript">
			function userAction() {
				// alert( 'userAction() clicked' );
				var d = document.forms[0];
				d.action = "login";
				d.submit();
			}
		</script>

		<style type="text/css">
			.errorMessage {
				font-size: 12px;
				color: red;
			}
		</style>
	</head>

	<body>
		<center>
			<h2>
				Struts2-Spring-Ibatis 用户登录
			</h2>
		</center>
		<center>
			<s:actionmessage />
			<!-- 用来提示用户名或密码错误 -->
			<font color="red"> ${requestScope.error}</font>
			<s:form method="post">
				<table>
					<tr>
						<td>
							<s:textfield label="用户名" name="user.name" />
						</td>
					</tr>
					<tr>
						<td>
							<s:password label="密码" name="user.password" />
						</td>
					</tr>
					<tr align="center">
						<td colspan="2">
							<!-- input type="image" src="images/tj.gif" onclick="userAction();" />  -->

							<input type="button" value="登录" name="Login" onclick="userAction();" />

							<!-- input type="image" src="images/cz.gif" onclick="" />  -->
							<input type="reset" value="重置" name="Reset" />
						</td>
					</tr>
				</table>
			</s:form>
			<a href="pages/register.jsp">注册</a>
		</center>
	</body>
</html>